<ui:composition
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui"
        xmlns:jsf="http://xmlns.jcp.org/jsf"
        xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
        xmlns:pe="http://primefaces.org/ui/extensions"
        xmlns:ezcomp="http://xmlns.jcp.org/jsf/composite/ezcomp">
    <script>
        $(function () {
            var Height = (document.documentElement.clientHeight || document.body.clientHeight) + 175;
            document.getElementById("maintab:expenseForm:table").style.height = Height - 400 + "px";
        });
        window.onresize = function () {
            var Height = (document.documentElement.clientHeight || document.body.clientHeight) + 175;
            document.getElementById("maintab:expenseForm:table").style.height = Height - 800 + "px";
        };
    </script>
    <script language="JavaScript" type="text/javascript">
        function clearNoNum(obj) {
            obj.value = obj.value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
            obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
            obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
            obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
        }

        // function imageClick($this) {//调用后台方法,显示图片
        //     document.querySelector('[id="maintab:expenseForm:imageLookDialog_content"]').style.padding = "0px";
        //     document.getElementById("imageIframe").contentWindow.document.getElementById('img').setAttribute("src", $this.getAttribute('src'));
        //     document.getElementById("imageIframe").contentWindow.drag("#img");
        // PF('imageLookDialog').show();
        // }
    </script>
    <style>
        .inputStylewidth {
            width: 100%
        }
    </style>
    <h:form id="expenseForm">
        <td style="display: none" values="#{kzbd.bb('expense').mc.csh()}"></td>
        <p:panel id="khlxr_panelone" style="height: 40px;font-weight: bolder;font-size: 20px;text-align: center ">
            <span>费用单</span>
        </p:panel>
        <!--按钮-->
        <p:menubar id="menu">
            <f:facet name="options">
                <p:commandButton value="刷新" disabled="#{kzbd.bb('expense').mc.buttwo}" icon="fa fa-refresh"
                                 action="#{kzbd.bb('expense').mc.shuaxin()}"
                                 update="maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:ReimbursementType,maintab:expenseForm:zh,maintab:expenseForm:sh,maintab:expenseForm:tb"/>
                <p:commandButton value="新增" icon="fa fa-plus-square" id="insertbtn"
                                 disabled="#{kzbd.bb('expense').mc.buttwo}"
                                 action="#{kzbd.bb('expense').mc.insertfun()}"
                                 update="maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:ReimbursementType,maintab:expenseForm:zh,maintab:expenseForm:sh,maintab:expenseForm:tb"/>
                <p:commandButton value="修改" icon="fa fa-pencil-square-o" disabled="#{kzbd.bb('expense').mc.xiugai}"
                                 action="#{kzbd.bb('expense').mc.updatefun()}"
                                 process="@this,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"
                                 update="maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:zh,maintab:expenseForm:sh,maintab:expenseForm:tb"/>
                <p:commandButton value="关联合同" icon="fa fa-pencil-square-o" disabled="#{kzbd.bb('expense').mc.update}"
                                 action="#{kzbd.bb('expense').mc.htqUpdate()}"
                                 process="@this,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"
                                 update="maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:zh,maintab:expenseForm:sh,maintab:expenseForm:tb"/>
                <p:commandButton value="保存" icon="fa fa-save" id="savebtn" disabled="#{kzbd.bb('expense').mc.butone}"
                                 action="#{kzbd.bb('expense').mc.savefun()}"
                                 process="@this,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"
                                 update="maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:zh,maintab:expenseForm:sh,maintab:expenseForm:tb"/>
                <p:commandButton
                        process="@this,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"
                        update="maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:zh,maintab:expenseForm:sh,maintab:expenseForm:tb"
                        disabled="#{kzbd.bb('expense').mc.shanchu}" action="#{kzbd.bb('expense').mc.deletefun()}"
                        icon="fa fa-trash" value="删除">
                    <p:confirm header="提示：" message="确认要删除此记录吗？删除后将不能恢复！" icon="fa fa-alert"/>
                </p:commandButton>
                <p:commandButton value="放弃" icon="fa fa-close" id="nosavebtn" disabled="#{kzbd.bb('expense').mc.butone}"
                                 action="#{kzbd.bb('expense').mc.nosavefun()}"
                                 update="maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:zh,maintab:expenseForm:sh"/>
                <p:commandButton value="查询" icon="fa fa-search" id="cx" disabled="#{kzbd.bb('expense').mc.buttwo}"
                                 process="@this" action="#{kzbd.bb('expense').mc.select()}"/>
                <p:commandButton value="提交" icon="fa fa-check" disabled="#{kzbd.bb('expense').mc.tj}"
                                 action="#{kzbd.bb('expense').mc.sptj}"
                                 process="@this,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"
                                 update="msg">
                    <p:ajax event="dialogReturn" listener="#{kzbd.bb('expense').mc.handleReturn}"
                            process="@this,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb"
                            update="msg,maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:zh,maintab:expenseForm:sh,maintab:expenseForm:tb"/>
                </p:commandButton>
                <p:commandButton value="审核" icon="fa fa-expeditedssl" disabled="#{kzbd.bb('expense').mc.shenhe}"
                                 process="@this,maintab:expenseForm:expenseHeader"
                                 update="maintab:expenseForm:expenseHeader" action="#{kzbd.bb('expense').mc.sp()}">
                    <p:ajax event="dialogReturn" listener="#{kzbd.bb('expense').mc.handleReturn2}"
                            process="@this,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb"
                            update="msg,maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:zh,maintab:expenseForm:sh,maintab:expenseForm:tb"/>
                </p:commandButton>
                <p:commandButton value="弃审" icon="fa fa-key" disabled="#{kzbd.bb('expense').mc.qishen}"
                                 process="@this,maintab:expenseForm:expenseHeader"
                                 update="maintab:expenseForm:expenseHeader" action="#{kzbd.bb('expense').mc.qishen()}"/>
                <p:commandButton value="附件上传" icon="fa fa-download" disabled="#{kzbd.bb('expense').mc.fjsc}"
                                 action="#{kzbd.bb('expense').mc.wjcx()}"
                                 update="msg,maintab:expenseForm:fujian,maintab:expenseForm:wjlist"
                                 process="@this,maintab:expenseForm:tb"/>
                <p:commandButton value="附件预览" id="fjyl" icon="fa fa-eye" disabled="#{kzbd.bb('expense').mc.fjyl}"
                                 action="#{kzbd.bb('expense').mc.yulan()}" update="maintab:expenseForm:yulan,msg"/>
                <p:commandButton value="首页" icon="fa fa-fast-backward" disabled="#{kzbd.bb('expense').mc.buttwo}"
                                 process="@this,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"
                                 action="#{kzbd.bb('expense').mc.shouyefun()}"
                                 update="maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"/>
                <p:commandButton value="上页" icon="fa fa-step-backward" disabled="#{kzbd.bb('expense').mc.buttwo}"
                                 process="@this,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"
                                 action="#{kzbd.bb('expense').mc.prepagefun()}"
                                 update="maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"/>
                <p:commandButton value="下页" icon="fa fa-step-forward" disabled="#{kzbd.bb('expense').mc.buttwo}"
                                 process="@this,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"
                                 action="#{kzbd.bb('expense').mc.nextpagefun()}"
                                 update="maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"/>
                <p:commandButton value="末页" icon="fa fa-fast-forward" disabled="#{kzbd.bb('expense').mc.buttwo}"
                                 process="@this,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"
                                 action="#{kzbd.bb('expense').mc.lastpagefun()}"
                                 update="maintab:expenseForm:menu,maintab:expenseForm:expenseHeader,maintab:expenseForm:itemtb,maintab:expenseForm:tb"/>
            </f:facet>
        </p:menubar>
        <!--pdf上传-->
        <p:dialog id="fujian" visible="#{kzbd.bb('expense').mc.rs2}" widgetVar="fujian" header="附件上传" closable="false"
                  maximizable="true" height="400" width="800" style="font-size: 30px;">
            <p:menubar id="mes_wj_001">
                <f:facet name="options">
                    <p:commandButton process="@this,maintab:expenseForm:expenseHeader"
                                     action="#{kzbd.bb('expense').mc.GBrs1}" icon="fa fa-close"
                                     update="msg,maintab:expenseForm:fujian,maintab:expenseForm:itemtb" value="关闭"/>
                </f:facet>
            </p:menubar>
            <p:fileUpload cancelLabel="取消" uploadLabel="导入文件" multiple="false" auto="false" label="选择上传文件"
                          listener="#{kzbd.bb('expense').mc.upfile2}" sizeLimit="5000000000"
                          update="fujian,msg,maintab:expenseForm:menu" invalidFileMessage="文件类型不匹配"/>
            <div style="height:380px">
                <p:dataTable emptyMessage="无记录" id="wjlist" rowIndexVar="lia" resizableColumns="true"
                             showGridlines="true" stripedRows="true"
                             value="#{kzbd.bb('expense').mc.wjlist}" var="row" rowKey="#{row.id}"
                             selection="#{kzbd.bb('expense').mc.wjselectrow}" reflow="true" styleClass="products-table"
                             scrollable="true" scrollHeight="95%" selectionMode="single"
                             paginator="true" rows="100" style="visibility: visible !important;height: 380px"
                             paginatorPosition="bottom" rowsPerPageTemplate="10,20,50,100">
                    <p:column headerText="文件名称" sortBy="#{row.filename}" style="width: 100px;text-align: center">
                        <h:outputText value="#{row.filename}" style="display: block;text-align: left"/>
                    </p:column>
                    <p:column headerText="操作" style="width: 45px;text-align:center">
                        <p:commandButton value="删除" icon="fa fa-trash"
                                         action="#{kzbd.bb('expense').mc.wdshanchu(row)}"
                                         update="msg,maintab:expenseForm:fujian,maintab:expenseForm:wjlist,maintab:expenseForm:menu"
                                         process="@this,maintab:expenseForm:wjlist">
                            <p:confirm header="提示：" message="确认要删除此记录吗？删除后将不能恢复！" icon="fa fa-alert"/>
                        </p:commandButton>
                    </p:column>
                </p:dataTable>
            </div>
        </p:dialog>
        <!--删除提示弹框-->
        <p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
            <p:commandButton value="是" type="button" styleClass="ui-confirmdialog-yes" icon="fa fa-check"/>
            <p:commandButton value="否" type="button" styleClass="ui-confirmdialog-no" icon="fa fa-close"/>
        </p:confirmDialog>
        <!--pdf预览-->
        <p:dialog id="yulan" header="附件预览" widgetVar="yulan" height="100%" width="70%" closable="false"
                  visible="#{kzbd.bb('expense').mc.ylrs}">
            <p:menubar id="menu_yulan">
                <f:facet name="options">
                    <p:commandButton icon="fa fa-download" ajax="false" process="@this,maintab:expenseForm:tb" value="下载">
                        <p:fileDownload value="#{kzbd.bb('expense').mc.downLoad()}"/>
                    </p:commandButton>
                    <p:commandButton icon="fa fa-close" process="@this"
                                     actionListener="#{kzbd.bb('expense').mc.yulanclose()}"
                                     update="maintab:expenseForm:yulan" value="关闭"/>
                </f:facet>
            </p:menubar>
            <!--文件列表显示-->
            <div style="width: 100%">
                <div style="float: left;width:25%;height: 576px">
                    <p:dataTable value="#{kzbd.bb('expense').mc.filelist}" var="row" rowKey="#{row.id}"
                                 selectionMode="single" selection="#{kzbd.bb('expense').mc.fjxz}" id="tb"
                                 emptyMessage="无记录！" reflow="true">
                        <p:ajax event="rowDblselect" listener="#{kzbd.bb('expense').mc.wenjianyulanxs}" process="@this"
                                update="maintab:expenseForm:aaa,maintab:expenseForm:pdf"/>
                        <p:column headerText="文件名称">
                            <h:outputText value="#{row.filename}"/>
                        </p:column>
                    </p:dataTable>
                </div>
                <div style="float: right;width:75%;height: 700px;overflow: auto">
                    <p:panel id="aaa">
                        <p:graphicImage stream="false"  value="#{kzbd.bb('expense').mc.ylfile}"
                                        id="image" style="width: 100%;height: 700"/>
                    </p:panel>
                </div>
            </div>
        </p:dialog>
        <p:dialog id="pdf" widgetVar="pdf" modal="true" closable="false" height="100%" width="70%">
            <p:menubar id="paf_menu">
                <f:facet name="options">
                    <p:commandButton icon="fa fa-close" process="@this"
                                     onclick="PF('pdf').hide();"
                                     update="maintab:expenseForm:yulan" value="关闭"/>
                </f:facet>
            </p:menubar>
            <object type="application/pdf"  data="#{kzbd.bb('expense').mc.ylfile}" style="width: 100%" height="680" width="100%" internalinstanceid="6"></object>
        </p:dialog>
        <!--图片查看-->
        <!--        <p:dialog style="padding: 0px;margin: 0px" id="imageLookDialog" header="图片查看"-->
        <!--                  modal="true" width="100%" height="750" widgetVar="imageLookDialog" fitViewport="true" closable="false"-->
        <!--                  responsive="true" resizable="true">-->
        <!--            <p:commandButton value="关闭" style="float: right" type="button" icon="fa fa-close"-->
        <!--                             onclick="PF('imageLookDialog').hide();"/>-->
        <!--            <iframe id="imageIframe" src="ImageLook.xhtml" style="overflow:auto;" height="90%"-->
        <!--                    width="100%"/>-->
        <!--        </p:dialog>-->
        <!--表头-->
        <p:panel id="expenseHeader" style=" height: 160px;width: 100%">
            <h:panelGrid columns="8" cellpadding="8" style="width: 100%">
                <p:outputLabel value="单据编号" style="width: 100%"/>
                <p:inputText value='#{kzbd.bb("expense").mc.datalist["ccode"]}' readonly="true" style="width: 100%"/>

                <p:outputLabel value="报销类型" style="width: 100%">
                    <h:outputText style="color: red; size: 10px" value="*"/>
                </p:outputLabel>
                <p:selectOneMenu value='#{kzbd.bb("expense").mc.datalist["reimbursementType"]}'
                                 disabled="#{kzbd.bb('expense').mc.baoxiao}" id="ReimbursementType" style="width: 100%">
                    <p:ajax event="change" listener="#{kzbd.bb('expense').mc.dtxslx()}"
                            process="@this,maintab:expenseForm:itemtb" update="maintab:expenseForm:itemtb"/>
                    <f:selectItem itemLabel="请选择" itemValue="0"/>
                    <f:selectItem itemLabel="公共费用" itemValue="1"/>
                    <f:selectItem itemLabel="项目费用" itemValue="2"/>
                    <f:selectItem itemLabel="客户费用" itemValue="3"/>
                    <f:selectItem itemLabel="合同前费用" itemValue="4"/>
                </p:selectOneMenu>

                <p:outputLabel value="合同编号" style="width: 100%"/>
                <h:panelGroup>
                    <div class="ui-inputgroup">
                        <p:inputText id="bb" value='#{kzbd.bb("expense").mc.datalist["code"]}' autocomplete="off"
                                     disabled="#{kzbd.bb('expense').mc.ht}" style="width: 100%"/>
                        <p:commandButton id="ht" style="zoom: 0.65" icon="pi pi-search"
                                         action="#{kzbd.bb('expense').mc.khczht()}"
                                         disabled="#{kzbd.bb('expense').mc.ht}"
                                         update="msg,maintab:expenseForm:khczht,maintab:expenseForm:htttb"/>
                    </div>
                </h:panelGroup>
                <p:outputLabel value="客户名称" style="width: 100%"/>
                <p:autoComplete id="aa" value='#{kzbd.bb("expense").mc.datalist["cusName"]}'
                                readonly="#{kzbd.bb('expense').mc.lbif}"
                                completeMethod="#{kzbd.bb('expense').mc.selectkh}" scrollHeight="300"
                                styleClass="inputStylewidth" inputStyle="width: 100%">
                    <p:ajax event="change" listener="#{kzbd.bb('expense').mc.hqkhid()}"
                            process="@this,maintab:expenseForm:aa" update="maintab:expenseForm:aa"/>
                </p:autoComplete>

                <h:outputLabel value="单据状态" style="width: 100%"/>
                <p:selectOneMenu value='#{kzbd.bb("expense").mc.datalist["constatus"]}' disabled="true"
                                 style="width:100%">
                    <f:selectItem itemLabel="" itemValue=""/>
                    <f:selectItem itemLabel="提交" itemValue="1"/>
                    <f:selectItem itemLabel="审批中" itemValue="2"/>
                    <f:selectItem itemLabel="生效" itemValue="3"/>
                    <f:selectItem itemLabel="驳回" itemValue="4"/>
                    <f:selectItem itemLabel="已删除" itemValue="5"/>
                    <f:selectItem itemLabel="开立" itemValue="6"/>
                </p:selectOneMenu>

                <p:outputLabel value="费用总金额" style="width: 100%"/>
                <p:inputNumber id="hkje" value='#{kzbd.bb("expense").mc.datalist["totalCost"]}' readonly="true"
                               decimalPlaces="2" nmouseover="this.title = this.value" inputStyle="width:100%"/>

                <p:outputLabel value="提报人" style="width: 100%">
                    <h:outputText style="color: red; size: 10px" value="*"/>
                </p:outputLabel>
                <ezcomp:s_cz czcode="RYCZ" maxResults="5" width="100%" stylewidth="100%"
                             change="#{kzbd.bb('expense').mc.change('RYCZ')}" showGridlines="true" stripedRows="true"
                             btndisabled="true" inputdisabled="true"
                             value="#{kzbd.bb('expense').mc.sczry}"/>

                <p:outputLabel value="提报部门" style="width: 100%">
                    <h:outputText style="color: red; size: 10px" value="*"/>
                </p:outputLabel>
                <h:panelGroup>
                    <div class="ui-inputgroup">
                        <p:inputText id="bumen" value='#{kzbd.bb("expense").mc.datalist["department"]}'
                                     disabled="#{kzbd.bb('expense').mc.lbif}" style="width:100%"/>
                        <p:commandButton type="button" style="zoom: 0.65" icon="pi pi-search"
                                         onclick="PF('modulescz').show();" disabled="#{kzbd.bb('expense').mc.lbif}"/>
                    </div>
                </h:panelGroup>
                <p:outputLabel value="提报时间" style="width: 100%">
                    <h:outputText style="color: red; size: 10px" value="*"/>
                </p:outputLabel>
                <p:datePicker pattern="yyyy-MM-dd" value='#{kzbd.bb("expense").mc.datalist["reportingTime"]}'
                              disabled="#{kzbd.bb('expense').mc.lbif}" monthNavigator="true" yearNavigator="true"
                              inputStyle="width:100%" styleClass="inputStylewidth"/>

                <p:outputLabel value="审核人"/>
                <p:inputText value='#{kzbd.bb("expense").mc.datalist["reviewer"]}' readonly="true" style="width:100%"/>
                <p:outputLabel value="审核时间"/>
                <p:inputText value='#{kzbd.bb("expense").mc.datalist["auditTime"]}' readonly="true" style="width:100%"/>
            </h:panelGrid>
        </p:panel>
        <!--表头树形-->
        <p:dialog header="部门信息" modal="false" widgetVar="modulescz" minHeight="50" id="modulescz" height="500"
                  width="600" resizable="true" draggable="true" responsive="true" hideEffect="scale"
                  style="font-size: 30px;">
            <p:commandButton process="@this,modulestree" update="msg,bumen,modulescz,modulestree"
                             action="#{kzbd.bb('expense').mc.assignme()}" value="确定"/>
            <p:commandButton process="@this" onclick="PF('modulescz').hide();" value="取消"/>
            <p:panel id="modulestree">
                <p:treeTable value="#{kzbd.bb('expense').mc.root}" var="row" id="modulesdocs" selectionMode="single"
                             selection="#{kzbd.bb('expense').mc.selectedNode}" scrollHeight="95%">
                    <p:column headerText="部门编码" sortBy="#{row.code}" filterBy="#{row.code}">
                        <h:outputText value="#{row.code}"/>
                    </p:column>
                    <p:column headerText="部门名称" sortBy="#{row.name}" filterBy="#{row.name}">
                        <h:outputText value="#{row.name}"/>
                    </p:column>
                </p:treeTable>
            </p:panel>
        </p:dialog>
        <p:panel id="menu1">
            <p:commandButton value="增行" id="zh" disabled="#{kzbd.bb('expense').mc.butone}"
                             process="@this,maintab:expenseForm:itemtb" update="msg,maintab:expenseForm:itemtb"
                             action="#{kzbd.bb('expense').mc.itemzhfun()}"/>
            <p:commandButton value="删行" id="sh" disabled="#{kzbd.bb('expense').mc.butone}"
                             process="@this,maintab:expenseForm:itemtb" update="msg,maintab:expenseForm:itemtb"
                             action="#{kzbd.bb('expense').mc.itemshfun()}"/>
        </p:panel>
        <!--表体-->
        <div id="table" style="height: 450px">
            <p:dataTable emptyMessage="无记录" id="itemtb" widgetVar="dtProducts" var="row" showGridlines="true"
                         stripedRows="true"
                         value="#{kzbd.bb('expense').mc.itemlist}" reflow="true" styleClass="products-table"
                         scrollable="true" scrollHeight="95%"
                         selection="#{kzbd.bb('expense').mc.itemtabxz}" rowKey="#{row.id}" paginator="true" rows="50"
                         paginatorTemplate="{CurrentPageReport} {inputpagenumber} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         currentPageReportTemplate="(行: {startRecord} - {endRecord} of {totalRecords}, 页: {currentPage}/{totalPages})"
                         rowsPerPageTemplate="50,100,150,200"
                         rowSelectMode="add" paginatorPosition="bottom" style="visibility: visible !important">
                <p:column selectionMode="multiple" exportable="false" style="box-sizing: content-box;width:5px"/>
                <p:column headerText="费用类型" sortBy="#{row.expenseType}"
                          style="box-sizing: content-box;text-align: center;width: 50px">
                    <p:selectOneMenu value="#{row.expenseType}" style="width:160px"
                                     disabled="#{kzbd.bb('expense').mc.lbif}">
                        <f:selectItems var="v" value="#{kzbd.bb('expense').mc.xzlist}" itemLabel="#{v.name}"
                                       itemValue="#{v.id}"/>
                    </p:selectOneMenu>
                </p:column>
                <p:column headerText="金额" sortBy="#{row.money}"
                          style="box-sizing: content-box;text-align: center;width: 50px">
                    <h:outputText style="color: red; size: 100px" value="*"/>
                    <p:inputNumber value="#{row.money}" readonly="#{kzbd.bb('expense').mc.lbif}"
                                   onmouseover="this.title = this.value" decimalPlaces="2" inputStyle="width:140px">
                        <p:ajax event="change" listener="#{kzbd.bb('expense').mc.gb()}"
                                update="msg,maintab:expenseForm:hkje" process="@this,maintab:expenseForm:itemtb"/>
                    </p:inputNumber>
                </p:column>
                <p:column headerText="用途" sortBy="#{row.purpose}"
                          style="box-sizing: content-box;text-align: center;width: 200px">
                    <h:outputText style="color: red; size: 100px" value="*"/>
                    <p:inputText value="#{row.purpose}" title="#{row.purpose}" style="width:500px"
                                 readonly="#{kzbd.bb('expense').mc.lbif}"/>
                </p:column>
                <p:column headerText="备注" sortBy="#{row.remark}"
                          style="box-sizing: content-box;text-align: center;width: 100px">
                    <p:inputText maxlength="255" value="#{row.remark}" title="#{row.remark}" style="width:250px"
                                 readonly="#{kzbd.bb('expense').mc.lbif}"/>
                </p:column>
            </p:dataTable>
        </div>
        <p:dialog id="khczht" header="合同参照" visible="#{kzbd.bb('expense').mc.rs1}" height="700" width="1400"
                  closable="false" maximizable="true">
            <p:menubar id="menu_wenjianyulan">
                <f:facet name="options">
                    <p:commandButton icon="fa fa-save" process="@this,maintab:expenseForm:khczht"
                                     actionListener="#{kzbd.bb('expense').mc.queren}"
                                     update="msg,maintab:expenseForm:aa,maintab:expenseForm:bb,maintab:expenseForm:khczht"
                                     value="确定"/>
                    <p:commandButton icon="fa fa-close" process="@this"
                                     actionListener="#{kzbd.bb('expense').mc.closekh}"
                                     update="maintab:expenseForm:khczht" value="关闭"/>
                </f:facet>
            </p:menubar>
            <div style="height: 600px">
                <p:dataTable emptyMessage="无记录" id="htttb" widgetVar="dtProducts" var="lii" rowIndexVar="ia"
                             selectionMode="single"
                             value="#{kzbd.bb('expense').mc.czhtbt}" reflow="true" scrollHeight="100%" scrollable="true"
                             filteredValue="#{kzbd.bb('expense').mc.gvjhlist}"
                             selection="#{kzbd.bb('expense').mc.czhtbtrow}" rowKey="#{lii.id}" paginator="true"
                             rows="20" paginatorPosition="bottom"
                             style="visibility: visible !important ;text-align: center"
                             rowsPerPageTemplate="10,20,50,100">
                    <p:ajax event="rowDblselect" listener="#{kzbd.bb('expense').mc.sjxzkh}"
                            update="msg,maintab:expenseForm:khczht,maintab:expenseForm:aa,maintab:expenseForm:bb"/>
                    <p:column headerText="合同编码" sortBy="#{lii.code}" filterBy="#{lii.code}" style="width: 70px"
                              filterMatchMode="contains">
                        <h:outputText value="#{lii.code}" style="width: 70px"/>
                    </p:column>
                    <p:column headerText="合同名称" sortBy="#{lii.name}" filterBy="#{lii.name}" style="width: 70px"
                              filterMatchMode="contains">
                        <h:outputText value="#{lii.name}" style="width: 70px"/>
                    </p:column>
                    <p:column headerText="客户名称" sortBy="#{lii.khmc}" filterBy="#{lii.khmc}" style="width: 70px"
                              filterMatchMode="contains">
                        <h:outputText value="#{lii.khmc}" style="width: 70px"/>
                    </p:column>
                    <p:column headerText="合同类型" sortBy="#{lii.htlx}" filterBy="#{lii.htlx}" style="width: 70px"
                              filterMatchMode="contains">
                        <h:outputText value="#{lii.htlx}" style="width: 70px"/>
                    </p:column>
                    <p:column headerText="签订日期" sortBy="#{lii.qdrq}" filterBy="#{lii.qdrq}" style="width: 70px"
                              filterMatchMode="contains">
                        <h:outputText value="#{lii.qdrq}" style="width: 70px"/>
                    </p:column>
                </p:dataTable>
            </div>
        </p:dialog>
    </h:form>
</ui:composition>
